<extend name="Base/base" />
<block name="css">

</block>

<block name="content">
<div class="page-header">
	<h1>
		权限管理
		<small>
			<i class="icon-double-angle-right"></i>
			添加权限规则
		</small>
	</h1>
</div><!-- /.page-header -->

<div class="row">
	<div class="col-xs-12">
		<!-- 页面 内容 开始 -->
		<form action="{:U('Ask/doAdd')}" method="post" class="form-horizontal" role="form" id="add_form">
			<!-- 权限规则分类 -->
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-2"> 所属类别： </label>
				<div class="col-sm-5">
					<select name="cid" class="form-control" id="form-field-select-1">
						<option value="0">--请选择问题类别--</option>
						
						<foreach name="cats" item="v">

							<option value="{$v['id']}">{$v["_name"]}</option>

						</foreach>
					</select>
				</div>
			</div>
			<div class="space-4"></div>
			<!-- 规则名称 -->
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 问题标题： </label>

				<div class="col-sm-9">
					<input name="title" type="text" id="form-field-1" placeholder="如：添加xx,xx列表" class="col-xs-10 col-sm-5" />
				</div>
			</div>
			<div class="space-4"></div>
			<!-- 问题描述 -->
			<div class="form-group">
				<label class="col-sm-3 control-label no-padding-right" for="form-field-1"> 问题描述： </label>
				<div class="col-sm-9">
					<div class="widget-box">
						<div class="widget-header widget-header-small header-color-blue">  </div>

						<div class="widget-body">
							<div class="widget-main no-padding">
								<textarea class="span12" name="content" data-provide="markdown" rows="10">markdown</textarea>
							</div>

							<!-- <div class="widget-toolbox padding-4 clearfix">
								<div class="btn-group pull-left">
									<button class="btn btn-sm btn-info">
										<i class="icon-remove bigger-125"></i>
										Cancel
									</button>
								</div>

								<div class="btn-group pull-right">
									<button class="btn btn-sm btn-purple">
										<i class="icon-save bigger-125"></i>
										Save
									</button>
								</div>
							</div> -->
						</div>
					</div>
				</div>
			</div>

			<div class="clearfix form-actions">
				<div class="col-md-offset-3 col-md-9">
					<button class="btn btn-info" type="button" id="add-submit">
						<i class="icon-ok bigger-110"></i>
						ajax Submit
					</button>

					&nbsp; &nbsp; &nbsp;
					<button class="btn" type="submit">
						<i class="icon-undo bigger-110"></i>
						post submit
					</button>
				</div>
			</div>
		</form>
		<!-- PAGE CONTENT ENDS -->
	</div><!-- /.col -->
</div><!-- /.row -->
</block>

<block name="js">
	<!-- 引入本页面需要的脚本文件 -->
	<script src="__PUBLIC__/assets/js/jquery-ui-1.10.3.custom.min.js"></script>
	<script src="__PUBLIC__/assets/js/jquery.ui.touch-punch.min.js"></script>
	<script src="__PUBLIC__/assets/js/markdown/markdown.min.js"></script>
	<script src="__PUBLIC__/assets/js/markdown/bootstrap-markdown.min.js"></script>
	<script src="__PUBLIC__/assets/js/jquery.hotkeys.min.js"></script>
	<script src="__PUBLIC__/assets/js/bootstrap-wysiwyg.min.js"></script>
	<script src="__PUBLIC__/assets/js/bootbox.min.js"></script>
	<script>
		var SCOPE = {
			"add_url" : "{:U('Ask/doAdd')}",
			"success_url" : "{:U('Ask/index')}"
		};
	</script>
</block>